import {
  JIN_CHU_DEFAULT,
  TimeDetail,
  TextDetail,
  StatusDetail,
  ENERGY,
  DEFAULT_MSG_STATUS,
  RUNPGM_NO,
  STAGE_REMAIN_TIME
} from "../../constant";
// 真空炉-Z6  基础信息
export const MAP_DEATIL_VACUUM_FURNACE_Z6 = {
  // 上部分
  ...DEFAULT_MSG_STATUS,
  valveStatus1: StatusDetail(
    "downArea",
    "面板阀门1状态",
    "valveStatus1",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus2: StatusDetail(
    "downArea",
    "面板阀门2状态",
    "valveStatus2",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus3: StatusDetail(
    "downArea",
    "面板阀门3状态",
    "valveStatus3",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus4: StatusDetail(
    "downArea",
    "面板阀门4状态",
    "valveStatus4",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus5: StatusDetail(
    "downArea",
    "面板阀门5状态",
    "valveStatus5",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus6: StatusDetail(
    "downArea",
    "面板阀门6状态",
    "valveStatus6",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus7: StatusDetail(
    "downArea",
    "面板阀门7状态",
    "valveStatus7",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus8: StatusDetail(
    "downArea",
    "面板阀门8状态",
    "valveStatus8",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus9: StatusDetail(
    "downArea",
    "面板阀门9状态",
    "valveStatus9",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus10: StatusDetail(
    "downArea",
    "面板阀门10状态",
    "valveStatus10",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus11: StatusDetail(
    "downArea",
    "面板阀门11状态",
    "valveStatus11",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  valveStatus12: StatusDetail(
    "downArea",
    "面板阀门12状态",
    "valveStatus12",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  rootsPumpSwitch: StatusDetail(
    "downArea",
    "罗茨分压开关",
    "rootsPumpSwitch",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),

  ...RUNPGM_NO,
  ...STAGE_REMAIN_TIME,
  meter1RealTemp: TimeDetail(
    "downArea",
    "PV",
    "meter1RealTemp",
    require("@/assets/images/shebeiIcon/msg_7.png")
  ),
  meter1ControlTemp: TimeDetail(
    "downArea",
    "SP",
    "meter1ControlTemp",
    require("@/assets/images/shebeiIcon/msg_7.png"),
    "℃"
  ),
  // 能源信息
  ...ENERGY,
  gasBlower: TextDetail(
    "downArea",
    "鼓风机电流",
    "gasBlower",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),
  chamber1: TextDetail(
    "downArea",
    "炉内压力1",
    "chamber1",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "mPa"
  ),
  chamber2: TextDetail(
    "downArea",
    "炉内压力2",
    "chamber2",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "Pa"
  ),
  chamber3: TextDetail(
    "downArea",
    "炉内压力3",
    "chamber3",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "Pa"
  ),
  chamber4: TextDetail(
    "downArea",
    "炉内压力4",
    "chamber4",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "Pa"
  ),
  foreline: TextDetail(
    "downArea",
    "前级管道压力",
    "foreline",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "Pa"
  ),
  airBleedTime: TextDetail(
    "downArea",
    "抽气时间",
    "airBleedTime",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "秒"
  ),
  holdPressureSetting: TextDetail(
    "downArea",
    "保持压力设定",
    "holdPressureSetting",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "Pa"
  ),
  highTempSetting: TextDetail(
    "downArea",
    "工件偶超温设定",
    "highTempSetting",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "℃"
  ),
  executeHoldTimeSetting: TextDetail(
    "downArea",
    "执行保持时间设定",
    "executeHoldTimeSetting",
    require("@/assets/images/shebeiIcon/msg_1.png"),
    "分钟"
  ),
  tempCheckNum: TextDetail(
    "downArea",
    "温度检测(工件偶数量)",
    "tempCheckNum",
    require("@/assets/images/shebeiIcon/msg_1.png")
  ),

  ...JIN_CHU_DEFAULT
};

// 真空炉 Z-6  阶段配方信息
export const VACUUM_FORMULA_INFO_Z6 = [
  {
    label: "阶段",
    key: "stageId",
    value: "",
    type: "",
    stageId: ""
  },
  {
    label: "升/降温速率",
    key: "oneExpandInfo",
    value: "",
    type: "input",
    oneExpandInfo: "",
    required: true,
    disabled: false
  },
  {
    label: "保温设定值",
    key: "twoExpandInfo",
    value: "",
    type: "input",
    twoExpandInfo: "",
    required: true,
    disabled: false
  },
  {
    label: "带宽",
    key: "threeExpandInfo",
    value: "",
    type: "input",
    threeExpandInfo: "",
    required: true,
    disabled: false
  },
  {
    label: "小时/分钟设定值",
    key: "fourExpandInfo",
    value: "",
    type: "input",
    fourExpandInfo: "",
    rulesType: "number",
    disabled: false,
    required: true
  },
  {
    label: "事件",
    key: "fiveExpandInfo",
    _key: "_fiveExpandInfo",
    value: "",
    _vlaue: "",
    type: "select",
    multiple: true,
    fiveExpandInfo: "",
    rulesType: "object",
    required: true,
    disabled: false,
    // validator: (rule, value, callback, list) => {
    //   if (!value.length) {
    //     callback(new Error("请选择事件"));
    //   } else {
    //     callback();
    //   }
    // },
    change: (val, item, row) => {
      console.log("val :>> ", val, item, row);
    },
    options: [
      {
        label: "真空冷",
        value: "真空冷"
      },
      {
        label: "静态冷",
        value: "静态冷"
      },
      {
        label: "强制冷却",
        value: "强制冷却"
      },
      {
        label: "正压",
        value: "正压"
      },
      {
        label: "工件偶确保保温",
        value: "工件偶确保保温"
      },
      {
        label: "泄露测试",
        value: "泄露测试"
      },
      {
        label: "分压",
        value: "真空冷"
      }
    ]
  },
  {
    label: "分压压力",
    key: "sixExpandInfo",
    value: "",
    type: "input",
    sixExpandInfo: "",
    required: true,
    disabled: true
  },
  {
    label: "sevenExpandInfo",
    key: "sevenExpandInfo",
    value: "",
    type: "radio",
    sevenExpandInfo: "",
    hide: true
  },
  {
    label: "eightExpandInfo",
    key: "eightExpandInfo",
    value: "",
    type: "radio",
    eightExpandInfo: "",
    hide: true
  },
  {
    label: "nineExpandInfo",
    key: "nineExpandInfo",
    value: "",
    type: "radio",
    eightExpandInfo: "",
    hide: true
  },
  {
    label: "tenExpandInfo",
    key: "tenExpandInfo",
    value: "",
    type: "radio",
    eightExpandInfo: "",
    hide: true
  }
];

// 真空炉Z6的 图表展示字段
export const CHART_KEYS_Z6 = [
  {
    key: "meter1RealTemp",
    label: "PV"
  }
];
